package guiclient;

import client.Client;
import client.ClientSession;
import command.client.AskTheConversationHistoryClient;
import java.awt.Color;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import javax.swing.JTable;
import javax.swing.table.DefaultTableModel;
import model.Conversation;
import model.Message;
import model.User;

public class GUIChatPrincipal extends javax.swing.JFrame {

    private Color colorBackgroud = new Color(240, 240, 240);
    private HashMap<String, GUIChatWindow> conversations = new HashMap<>();
    private Client client;
    private GUIError error = new GUIError();
    private DefaultTableModel tableModel;
    private ArrayList<String> userListSelected = new ArrayList<>();
    private ArrayList<Conversation> conversationsHistory = new ArrayList<>();

    public GUIChatPrincipal() {
        initComponents();
        getContentPane().setBackground(colorBackgroud);
        tableModel = (DefaultTableModel) userListActiveJTable.getModel();
    }

    public GUIChatPrincipal(Client session) {
        initComponents();
        getContentPane().setBackground(colorBackgroud);
        tableModel = (DefaultTableModel) userListActiveJTable.getModel();
        client = session;
    }

    public void newInvitationToChat(String userNickName, String idOfConversation, ClientSession session) {
        GUIInvitationToChat invitationToChat = new GUIInvitationToChat(this, rootPaneCheckingEnabled,
                userNickName, idOfConversation, session);
    }

    public HashMap<String, GUIChatWindow> getConversations() {
        return conversations;
    }

    public void setSession(Client session) {
        client = session;
    }

    public DefaultTableModel getUserTableModel() {
        return (DefaultTableModel) userListActiveJTable.getModel();
    }

    public JTable getUserListActiveJTable() {
        return userListActiveJTable;
    }

    public void newGUIChatWindow(String conversationID, ArrayList<User> usersActive) {
        Conversation conversation = new Conversation();
        conversation.setConversationID(conversationID);
        conversation.setConversationUsersActive(usersActive);
        GUIChatWindow newChat = new GUIChatWindow(client, conversation);
        conversations.put(conversationID, newChat);
    }

    public void updateAllUserList(ArrayList<User> userList) {
        tableModel = (DefaultTableModel) userListActiveJTable.getModel();
        tableModel.setNumRows(0);
        Iterator it = userList.iterator();
        while (it.hasNext()) {
            User u = (User) it.next();
            Object[] data = new Object[1];
            data[0] = u.getUserNickName();
            tableModel.addRow(data);
        }
        userListActiveJTable.setModel(tableModel);
    }

    private void inviteUserAtConversation() {
        userListSelected = new ArrayList<>();
        String userSessionNickName = client.getSession().getUserSession().getUserNickName();
        int fileSelected = userListActiveJTable.getSelectedRow();
        userListSelected.add((String) userListActiveJTable.getModel().getValueAt(fileSelected, 0));
        if (userListSelected.contains(userSessionNickName)) {
            userListSelected.remove(userSessionNickName);
        }
        if (userListSelected.size() > 0) {
            Conversation conversation = new Conversation();
            conversation.setConversationID(conversation.generateConversationID());
            conversation.addUserAtConversation(client.getSession().getUserSession());
            GUIChatWindow newChat = new GUIChatWindow(client, conversation);
            conversations.put(conversation.getConversationID(), newChat);
            client.inviteUsersAtConversation(userListSelected,
                    client.getSession().getUserSession().getUserNickName(),
                    conversation);
        } else {
            error.setErrorMessage("Forever Alone...");
            error.setVisible(true);
        }
    }

    private void recoveryOfTheConversationHistory() {
        AskTheConversationHistoryClient command = new AskTheConversationHistoryClient();
        command.execute(client.getSession(), false);
    }

    public void setConversationsHistory(ArrayList<Conversation> conversations) {
        conversationsHistory = new ArrayList<>(conversations);
        updateConversationsHistoryTable();
        recoveryHistory.setVisible(true);
    }

    private void updateConversationsHistoryTable() {
        DefaultTableModel model = (DefaultTableModel) recoveryHistoryJTable.getModel();
        model.setRowCount(0);
        Iterator conversationsIterator = conversationsHistory.iterator();
        while (conversationsIterator.hasNext()) {
            Conversation c = (Conversation) conversationsIterator.next();
            Object[] tmp = new Object[4];
            tmp[0] = c.getConversationID();
            StringBuilder userList = new StringBuilder();
            Iterator usersIterator = c.getConversationAllUsers().iterator();
            while (usersIterator.hasNext()) {
                User u = (User) usersIterator.next();
                userList.append(u.getUserNickName());
                userList.append("; ");
            }
            tmp[1] = userList.toString();
            tmp[2] = c.getConversationDateStart();
            tmp[3] = c.getConversationDateEnd();
            model.addRow(tmp);
        }
        recoveryHistoryJTable.setModel(model);
    }

    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        recoveryHistory = new javax.swing.JFrame();
        recoveryHistoryJLabel = new javax.swing.JLabel();
        recoveryHistoryJScrollPane = new javax.swing.JScrollPane();
        recoveryHistoryJTable = new javax.swing.JTable();
        acceptRecoveryHistoryJButton = new javax.swing.JButton();
        cancelRecoveryHistoryJButton = new javax.swing.JButton();
        conversationRecovered = new javax.swing.JFrame();
        conversationRecoveredJLabel = new javax.swing.JLabel();
        conversationRecoveredJScrollPane = new javax.swing.JScrollPane();
        conversationRecoveredJTextPane = new javax.swing.JTextPane();
        invitePrincipalJButton = new javax.swing.JButton();
        firstJSeparator = new javax.swing.JSeparator();
        userServerListJLabel = new javax.swing.JLabel();
        recoveryPrincipalJButton = new javax.swing.JButton();
        exitPrincipalJButton = new javax.swing.JButton();
        userListActiveJScrollPane = new javax.swing.JScrollPane();
        userListActiveJTable = new javax.swing.JTable();
        chatPrincipalJMenuBar = new javax.swing.JMenuBar();
        optionsPrincipalJMenu = new javax.swing.JMenu();
        inviteOptionsPrincipalJMenuItem = new javax.swing.JMenuItem();
        recoveryOptionsPrincipalJMenuItem = new javax.swing.JMenuItem();
        exitOptionsPrincipalJMenuItem = new javax.swing.JMenuItem();

        recoveryHistory.setTitle("Histórico de Conversaciones");
        recoveryHistory.setLocationByPlatform(true);
        recoveryHistory.setMinimumSize(new java.awt.Dimension(500, 350));

        recoveryHistoryJLabel.setText("Lista de Conversaciones Mantenidas:");

        recoveryHistoryJTable.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "Conversación ID", "Participantes", "Fecha de Inicio", "Fecha de Fin"
            }
        ) {
            boolean[] canEdit = new boolean [] {
                false, false, false, false
            };

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        recoveryHistoryJScrollPane.setViewportView(recoveryHistoryJTable);

        acceptRecoveryHistoryJButton.setText("Ver Conversación");
        acceptRecoveryHistoryJButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                acceptRecoveryHistoryJButtonActionPerformed(evt);
            }
        });

        cancelRecoveryHistoryJButton.setText("Cancelar");
        cancelRecoveryHistoryJButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cancelRecoveryHistoryJButtonActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout recoveryHistoryLayout = new javax.swing.GroupLayout(recoveryHistory.getContentPane());
        recoveryHistory.getContentPane().setLayout(recoveryHistoryLayout);
        recoveryHistoryLayout.setHorizontalGroup(
            recoveryHistoryLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(recoveryHistoryLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(recoveryHistoryLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(recoveryHistoryJScrollPane)
                    .addGroup(recoveryHistoryLayout.createSequentialGroup()
                        .addComponent(acceptRecoveryHistoryJButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(cancelRecoveryHistoryJButton, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addComponent(recoveryHistoryJLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );
        recoveryHistoryLayout.setVerticalGroup(
            recoveryHistoryLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(recoveryHistoryLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(recoveryHistoryJLabel)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(recoveryHistoryJScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 246, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(recoveryHistoryLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(acceptRecoveryHistoryJButton)
                    .addComponent(cancelRecoveryHistoryJButton))
                .addContainerGap())
        );

        conversationRecovered.setTitle("Conversación Recuperada");
        conversationRecovered.setLocationByPlatform(true);
        conversationRecovered.setMinimumSize(new java.awt.Dimension(450, 350));

        conversationRecoveredJLabel.setText("Conversación:");

        conversationRecoveredJTextPane.setEditable(false);
        conversationRecoveredJScrollPane.setViewportView(conversationRecoveredJTextPane);

        javax.swing.GroupLayout conversationRecoveredLayout = new javax.swing.GroupLayout(conversationRecovered.getContentPane());
        conversationRecovered.getContentPane().setLayout(conversationRecoveredLayout);
        conversationRecoveredLayout.setHorizontalGroup(
            conversationRecoveredLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(conversationRecoveredLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(conversationRecoveredLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(conversationRecoveredJLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 380, Short.MAX_VALUE)
                    .addComponent(conversationRecoveredJScrollPane))
                .addContainerGap())
        );
        conversationRecoveredLayout.setVerticalGroup(
            conversationRecoveredLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(conversationRecoveredLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(conversationRecoveredJLabel)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(conversationRecoveredJScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 258, Short.MAX_VALUE)
                .addContainerGap())
        );

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("CEU-Messeger");
        setLocationByPlatform(true);
        addWindowListener(new java.awt.event.WindowAdapter() {
            public void windowClosing(java.awt.event.WindowEvent evt) {
                formWindowClosing(evt);
            }
        });

        invitePrincipalJButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/guiclient/images/inviteuser60.png"))); // NOI18N
        invitePrincipalJButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        invitePrincipalJButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                invitePrincipalJButtonActionPerformed(evt);
            }
        });

        userServerListJLabel.setText("Lista de Usuarios Conectados:");

        recoveryPrincipalJButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/guiclient/images/historic60.png"))); // NOI18N
        recoveryPrincipalJButton.setToolTipText("");
        recoveryPrincipalJButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        recoveryPrincipalJButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                recoveryPrincipalJButtonActionPerformed(evt);
            }
        });

        exitPrincipalJButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/guiclient/images/exit60.png"))); // NOI18N
        exitPrincipalJButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        exitPrincipalJButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                exitPrincipalJButtonActionPerformed(evt);
            }
        });

        userListActiveJTable.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "Usuarios Activos"
            }
        ) {
            Class[] types = new Class [] {
                java.lang.String.class
            };
            boolean[] canEdit = new boolean [] {
                false
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        userListActiveJTable.setColumnSelectionAllowed(true);
        userListActiveJTable.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
        userListActiveJScrollPane.setViewportView(userListActiveJTable);
        userListActiveJTable.getColumnModel().getSelectionModel().setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);

        optionsPrincipalJMenu.setText("Opciones");

        inviteOptionsPrincipalJMenuItem.setIcon(new javax.swing.ImageIcon(getClass().getResource("/guiclient/images/inviteuser30.png"))); // NOI18N
        inviteOptionsPrincipalJMenuItem.setText("Invitar a Chatear");
        inviteOptionsPrincipalJMenuItem.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                inviteOptionsPrincipalJMenuItemActionPerformed(evt);
            }
        });
        optionsPrincipalJMenu.add(inviteOptionsPrincipalJMenuItem);

        recoveryOptionsPrincipalJMenuItem.setIcon(new javax.swing.ImageIcon(getClass().getResource("/guiclient/images/historic30.png"))); // NOI18N
        recoveryOptionsPrincipalJMenuItem.setText("Recuperar Histórico de Conversaciones");
        recoveryOptionsPrincipalJMenuItem.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                recoveryOptionsPrincipalJMenuItemActionPerformed(evt);
            }
        });
        optionsPrincipalJMenu.add(recoveryOptionsPrincipalJMenuItem);

        exitOptionsPrincipalJMenuItem.setIcon(new javax.swing.ImageIcon(getClass().getResource("/guiclient/images/exit30.png"))); // NOI18N
        exitOptionsPrincipalJMenuItem.setText("Salir");
        exitOptionsPrincipalJMenuItem.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                exitOptionsPrincipalJMenuItemActionPerformed(evt);
            }
        });
        optionsPrincipalJMenu.add(exitOptionsPrincipalJMenuItem);

        chatPrincipalJMenuBar.add(optionsPrincipalJMenu);

        setJMenuBar(chatPrincipalJMenuBar);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(firstJSeparator)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(userServerListJLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(invitePrincipalJButton)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(recoveryPrincipalJButton)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(exitPrincipalJButton)
                        .addGap(0, 104, Short.MAX_VALUE))
                    .addComponent(userListActiveJScrollPane, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(invitePrincipalJButton)
                    .addComponent(recoveryPrincipalJButton)
                    .addComponent(exitPrincipalJButton))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(firstJSeparator, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(userServerListJLabel)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(userListActiveJScrollPane, javax.swing.GroupLayout.DEFAULT_SIZE, 199, Short.MAX_VALUE)
                .addContainerGap())
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void invitePrincipalJButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_invitePrincipalJButtonActionPerformed
        inviteUserAtConversation();
    }//GEN-LAST:event_invitePrincipalJButtonActionPerformed

    private void recoveryPrincipalJButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_recoveryPrincipalJButtonActionPerformed
        recoveryOfTheConversationHistory();
    }//GEN-LAST:event_recoveryPrincipalJButtonActionPerformed

    private void exitPrincipalJButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_exitPrincipalJButtonActionPerformed
        client.sendMessageToServer("disconnectuserserver");
        System.exit(EXIT_ON_CLOSE);
    }//GEN-LAST:event_exitPrincipalJButtonActionPerformed

    private void inviteOptionsPrincipalJMenuItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_inviteOptionsPrincipalJMenuItemActionPerformed
        inviteUserAtConversation();
    }//GEN-LAST:event_inviteOptionsPrincipalJMenuItemActionPerformed

    private void recoveryOptionsPrincipalJMenuItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_recoveryOptionsPrincipalJMenuItemActionPerformed
        recoveryOfTheConversationHistory();
    }//GEN-LAST:event_recoveryOptionsPrincipalJMenuItemActionPerformed

    private void exitOptionsPrincipalJMenuItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_exitOptionsPrincipalJMenuItemActionPerformed
        client.sendMessageToServer("disconnectuserserver");
        System.exit(EXIT_ON_CLOSE);
    }//GEN-LAST:event_exitOptionsPrincipalJMenuItemActionPerformed

    private void formWindowClosing(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowClosing
        client.sendMessageToServer("disconnectuserserver");
    }//GEN-LAST:event_formWindowClosing

    private void cancelRecoveryHistoryJButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cancelRecoveryHistoryJButtonActionPerformed
        recoveryHistory.setVisible(false);
    }//GEN-LAST:event_cancelRecoveryHistoryJButtonActionPerformed

    private void acceptRecoveryHistoryJButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_acceptRecoveryHistoryJButtonActionPerformed
        int valueSelected = recoveryHistoryJTable.getSelectedRow();
        String conversationID = (String) recoveryHistoryJTable.getValueAt(valueSelected, 0);
        Iterator conversationsIterator = conversationsHistory.iterator();
        while (conversationsIterator.hasNext()) {
            Conversation c = (Conversation) conversationsIterator.next();
            if (c.getConversationID().equals(conversationID)) {
                Iterator messagesIterator = c.getConversationMessages().iterator();
                StringBuilder messages = new StringBuilder();
                while (messagesIterator.hasNext()) {
                    Message m = (Message) messagesIterator.next();
                    messages.append(m.getMessageDate());
                    messages.append(" - ");
                    messages.append(m.getMessageUser().getUserNickName());
                    messages.append(" dijo: \n");
                    messages.append(m.getMessageContent());
                    messages.append("\n");
                }
                conversationRecoveredJTextPane.setText(messages.toString());
                conversationRecovered.setVisible(true);
                break;
            }
        }
    }//GEN-LAST:event_acceptRecoveryHistoryJButtonActionPerformed

    public static void main(String args[]) {
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException | InstantiationException | IllegalAccessException |
                javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(GUIChatPrincipal.class.getName()).log(java.util.logging.Level.SEVERE,
                    "Fallo al inicializar la ventana principal del chat", ex);
        }
        java.awt.EventQueue.invokeLater(new Runnable() {

            @Override
            public void run() {
                new GUIChatPrincipal().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton acceptRecoveryHistoryJButton;
    private javax.swing.JButton cancelRecoveryHistoryJButton;
    private javax.swing.JMenuBar chatPrincipalJMenuBar;
    private javax.swing.JFrame conversationRecovered;
    private javax.swing.JLabel conversationRecoveredJLabel;
    private javax.swing.JScrollPane conversationRecoveredJScrollPane;
    private javax.swing.JTextPane conversationRecoveredJTextPane;
    private javax.swing.JMenuItem exitOptionsPrincipalJMenuItem;
    private javax.swing.JButton exitPrincipalJButton;
    private javax.swing.JSeparator firstJSeparator;
    private javax.swing.JMenuItem inviteOptionsPrincipalJMenuItem;
    private javax.swing.JButton invitePrincipalJButton;
    private javax.swing.JMenu optionsPrincipalJMenu;
    private javax.swing.JFrame recoveryHistory;
    private javax.swing.JLabel recoveryHistoryJLabel;
    private javax.swing.JScrollPane recoveryHistoryJScrollPane;
    private javax.swing.JTable recoveryHistoryJTable;
    private javax.swing.JMenuItem recoveryOptionsPrincipalJMenuItem;
    private javax.swing.JButton recoveryPrincipalJButton;
    private javax.swing.JScrollPane userListActiveJScrollPane;
    private javax.swing.JTable userListActiveJTable;
    private javax.swing.JLabel userServerListJLabel;
    // End of variables declaration//GEN-END:variables
}
